<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Network Setting</title>
<meta content="no-cache" http-equiv="Pragma"> 
<meta http-equiv="Cache-Control" content="no-cache"> 
<meta http-equiv="Expires" content="0"> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../web/pagestyle.css"/>
<base target="_self" />
<style type="text/css">
body{margin-top:5px}
</style>
<script>
    document.write("<script src='/cgi-bin/network.cgi?n=" + Math.random() + "'></" + "script>");
</script>
<script src="../web/jquery-1.3.2.min.js"></script>
<script>
$(function(){
        var tab_menu_li = $('.tab_menu li');
        $('.tab_box div:gt(0)').hide();
        tab_menu_li.click(function(){
            $(this).addClass('selected').siblings().removeClass('selected');
            var index = tab_menu_li.index(this);
            $('.tab_box div').eq(index).show().siblings().hide();
        }).hover(function(){	           
            $(this).addClass('hover');
            },function(){
            $(this).removeClass('hover');
        });
    });
function wc(obj)
{
    var form = document.form1;
      for(var i=0;i<wifiNum;i++)
      {
      	if(obj.value== ap[i][0])
      	{
	form.wifiAuth.value=ap[i][1];
	form.wifiEncryp.value=ap[i][2];
         }
      } 
}
function on_load(){
    var form = document.form1;
	if(dhcp==1)form.dhcp.checked ="checked";
	//if(UPnP==1)form.UPnp.checked = "checked";
	if(PPPoeEn==1)form.PPPoeEn.checked="checked";
	form.PPPoeAcc.value = PPPoeAcc;
	form.PPPoePWD.value = PPPoePWD;
	form.Ip.value = Ip;
	form.NetMask.value = NetMask;
	form.Gateway.value = Gateway;
	form.DNS1.value = DNS1;
	form.DNS2.value = DNS2;
	form.MngPort.value = MngPort;	
	if(wifiNum > 0)
	{		
      for(var i=0;i<wifiNum;i++)
      {
      	form.wifiSsid.options[i] = new Option(ap[i][0], ap[i][0]);
      } 
	}
	if(wifi==1)form.wifi.checked ="checked";
	form.wifiSsid.value = wifiSsid;
	form.wifiPwd.value = wifiPwd;
	form.wifiAuth.value=wifiAuth;
	form.wifiEncryp.value=wifiEncryp;
}
</script>
</head>
<body onload="on_load()">
<form name='form1' method="post" action='Network'>
<div class="tab" style="width:100%;">
<div class="tab_menu" style="text-align:center">
<ul>
    <li class="selected"><span>Native Network Setting</span></li>
	<li><span>PPPoE Setting</span></li>
	<li><span>WiFi Setting</span></li>	
</ul>
</div>
<div class="tab_block" ></div>
<div class="tab_box" style="height:260px">
<div>
  <table width="100%" cellspacing="4">
<tr>
<td style="width:40%" align="right">DHCP Enable:</td>
<td><input name="dhcp" type="checkbox"/></td>
</tr>
<tr>
<td align="right">IP ADDR:</td>
<td><input type="text" name='Ip' class="text"/></td>
</tr>
<tr>
<td align="right">Netmask:</td>
<td><input type="text" name='NetMask' class="text"/></td>
</tr> 
<tr>
<td align="right">Gateway:</td>
<td><input type="text"  name="Gateway" class="text"/></td>
</tr>
<tr>
<td align="right">Primary DNS:</td>
<td><input type="text" name='DNS1' class="text"/></td></tr>
<tr>
<td align="right">Secondary DNS:</td>
<td><input type="text" name='DNS2' class="text"/></td>
</tr>
<tr>
<td align="right">MngPort:</td>
<td><input type="text" name='MngPort' class="text"/></td>
</tr>
</table>
</div>
<div>
<table width="100%" cellspacing="4">
<tr>
<td width="40%" align="right">Start PPPoE:</td>
<td><input type='checkbox' name='PPPoeEn' /></td>
</tr>
<tr>
<td align="right">PPPoE Account:</td>
<td><input type="text" name='PPPoeAcc' value='' class="text"/></td>
</tr>
<tr> 
<td align="right">PPPoE Password:</td>
<td><input name='PPPoePWD' type='password' maxlength='31' class="text"/></td>
</tr> 
</table>
</div>
<div>
<table width="100%" cellspacing="4">
<tr>
<td width="40%" align="right">WIFI Enable:</td>
<td><input type='checkbox' name='wifi' /></td>
</tr>
 <tr>
<td align="right">WIFI APs:</td>
<td><select name="wifiSsid" class="select" onchange="wc(this)"></td>
</tr>
<tr>
<td align="right">WIFI Password:</td>
<td><input type="password" name='wifiPwd' class="text"/></td>
</tr>
<tr>
<td align="right">WIFI Authentication</td>
<td><select name="wifiAuth" class="select">
<option value="0">OPEN</option> 
<option value="1">SHARED</option> 
<option value="2">WEPAUTO</option> 
<option value="3">WPAPSK</option> 
<option value="4">WPA2PSK</option> 
<option value="5">WPANONE</option> 
</select></td>
</tr>
<tr> 
<td align="right">WIFI Encryption:</td>
<td><select name="wifiEncryp" class="select">
<option value="0">NONE</option> 
<option value="1">WEP</option> 
<option value="2">TKIP</option> 
<option value="3">AES</option> 
</select></td>
</tr>
</table>
</div>
</div>
</div>
<div class="tab_block" ></div>
<br />
<div align="center">
<table width="74" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="18" class="TOPBG" onmouseover="this.className='TOPBGOVER';" onmouseout="this.className='TOPBG';" onclick="document.form1.submit();window.close();"><div class="cog"/>OK</td>
</tr>
</table>
</div>
</form>
</body>
</html>
